#ifndef ACTION_NONDELAY_ACTION_H
#define ACTION_NONDELAY_ACTION_H

#include <functional>
#include "../action.h"

namespace action {

class NondelayAction : public Action {
 public:
  using Func = std::function<void()>;
  explicit NondelayAction(const Func &func) : func_(func) { }

  virtual std::string type() const override { return "Nondelay"; }

 public:
  virtual void start() override {
    Action::start();
    func_();
    finish();
  }

 private:
  Func func_;
};

}

#endif //ACTION_NONDELAY_ACTION_H
